/*
 * @Author: lsmi
 * @Date: 2021-06-08 20:33:28
 * @LastEditors: lsmi
 * @LastEditTime: 2021-07-11 11:59:18
 * @FilePath: \v2_play_js\src\store\index.js
 */
import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    storeList: [],
  },
  mutations: {
    setStoreList(state, list) {
      state.storeList = list;
    },
    setUnitStoreList(state, { index, data }) {
      state.storeList[index][data.key] = data.value;
    },
  },
  actions: {},
  modules: {},
});
